import React from "react";
import cls from "@/styles/feature/CreateUserAvatar.module.scss";
import { UserI } from "@/models/user";
import { Avatar } from "@/components/Avatar/Avatar";

type Props = {
  user: Partial<UserI>;
  updateUser: (v: Partial<UserI>) => void;
  isProfile?: boolean;
};

export const CreateUserAvatar = ({ user, updateUser, isProfile }: Props) => {
  return (
    <div className={cls.root}>
      <div className={cls.top}>
        <div className={cls.avatar}>
          <Avatar isBig />
        </div>
        <div className={cls.name}>
          {user.first_name} {user.last_name}
        </div>
      </div>
      {!isProfile && <div className={cls.bottom}>Загрузить изображение</div>}
    </div>
  );
};
